package com.dly.hope.modle;

import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author linyu.dai
 * @project myserve
 * @description 用户账号表
 * @creat 2022/8/26 10:32:53
 */
@Entity
@Table(name = "hope001_user_account")
@DynamicInsert
@DynamicUpdate

@Data
public class UserAccount extends BaseEntity{

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
    private String id;

    @Column(name = "account_name", unique = true)
    @Comment(value = "姓名 唯一")
    private String accountName;

    @Column(name = "account_number", unique = true)
    @Comment(value = "账号 唯一")
    private String accountNumber;

    @Column(name = "account_password")
    @Comment(value = "密码")
    private String passWord;

    @Column(name = "email", unique = true)
    @Comment(value = "邮箱 唯一")
    private String email;

    @Column(name = "avatar", unique = false)
    @Comment(value = "头像")
    private String avatar;

    @Column(name = "auto_agree")
    @Comment(value = "自动同意好友添加")
    private Integer autoAgree = 0;

    @Column(name = "auto_group_agree")
    @Comment(value = "自动同意群聊邀请")
    private Integer autoGroupAgree = 0;

    @Column(name = "refuse_group_agree")
    @Comment(value = "拒绝群聊邀请")
    private Integer refuseGroupAgree = 0;

    @Column(name = "refuse_agree")
    @Comment(value = "拒绝好友添加")
    private Integer refuseAgree = 0;

    @Column(name = "into_show")
    @Comment(value = "关闭说说显示")
    private Integer intoShow = 0;
}
